<?php
use yii\helpers\Html;
use yii\helpers\Url;

use common\models\MktPost;
?>
<div class="weui_media_box weui_media_appmsg">
    <a class="weui_media_hd" style="margin-top: -50px;" href="<?php echo Url::to(['wap/market-profile', 'id' => $model->user_id]); ?>">
        <img alt="" src="<?php echo \common\wosotech\Util::getWxUserHeadimgurl($model->user->theHeadimgurl, 46); ?>" style="height: 42px !important;width: 42px !important;" class="weui_media_appmsg_thumb">
    </a>
    <div class="weui_media_box weui_media_text" style="width:100%;">
        <div onclick="gotoProfile(<?php echo $model->user_id; ?>); return false;" class="weui_media_title"><span class="name"><?php echo $model->user->theName; //empty($model->is_anoymous) ? $model->user->theName : '***'; ?></span><span class="info"><?php echo $model->user->duty; ?></span></div>
        <div onclick="gotoWorkDetail(<?php echo $model->id; ?>); return false;"class="weui_info_box">
            <div class="weui_media_title"><?php echo $model->shortTitle; ?></div>
            <ul class="weui_media_info">
                <li class="weui_media_info_meta"><?php echo empty($model->area->longTitle) ? '' : $model->area->longTitle; ?></li>

                <?php if ($model->post_type == MktPost::POST_TYPE_JOB): ?>
                    <li class="weui_media_info_meta weui_media_info_meta_extra"><?php echo MktPost::getPostJobExperienceOption($model->job_experience); ?></li>
                    <li class="weui_media_info_meta weui_media_info_meta_extra"><?php echo MktPost::getPostJobSalaryMinOption($model->job_salary_min) . ' - ' . MktPost::getPostJobSalaryMaxOption($model->job_salary_max); ?></li>
                <?php elseif ($model->post_type == MktPost::POST_TYPE_COOPERATION): ?>
                    <li class="weui_media_info_meta weui_media_info_meta_extra"><?php echo $model->shortStartTime; ?></li>
                    <li class="weui_media_info_meta weui_media_info_meta_extra"><?php echo MktPost::getPostCooperationRewardOption($model->cooperation_reward); ?><?php //echo $model->shortContent; ?></li>
                <?php else: ?>
                <?php endif; ?>

            </ul>
        </div>
        <div class="weui_info_time"><?php echo \common\wosotech\Util::timeago($model->update_time); ?></div>
    </div>
</div>

<?php
/*
`$model`: mixed, the data model
`$key`: mixed, the key value associated with the data item
`$index`: integer, the zero-based index of the data item in the items array returned by [[dataProvider]].
`$widget`: ListView, this widget instance

    <a class="weui_media_hd" style="margin-top: -50px;" onclick="gotoManDetail(1)">
        <img alt="" src="<?php echo \common\wosotech\Util::getWxUserHeadimgurl($model->user->headimgurl, 46); ?>" style="height: 42px !important;width: 42px !important;" class="weui_media_appmsg_thumb">
    </a>

        <div onclick="gotoManDetail" class="weui_media_title"><span class="name"><?php echo $model->user->trueName; ?></span><span class="info"><?php echo $model->user->duty; ?></span></div>
        <div onclick="gotoWorkDetail" class="weui_info_box">
            <div class="weui_media_title"><?php echo $model->title; // 招聘市场经理 ?></div>
            <ul class="weui_media_info">
                <li class="weui_media_info_meta"><?php echo $model->area->title; // 江汉区 ?></li>
                <li class="weui_media_info_meta weui_media_info_meta_extra"><?php echo MktPost::getPostJobExperienceOption($model->job_experience);//2年工作经验 ?></li>
                <li class="weui_media_info_meta weui_media_info_meta_extra">5K+<?php //echo $model->nickname; // 5K+ ?></li>
            </ul>
        </div>

            <div class="weui_media_title">
                <a href="<?php echo Url::to(['wap/work-detail', 'id' => $model->id]); ?>">
                <span class="weui_media_title"><?php echo $model->shortTitle; ?></span>
                </a>
            </div>

*/